<?php
$conect = mysql_connect('localhost', 'root', '');
if (!$conect) {
    die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';

mysql_select_db('ngalam'); 

?>